	<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";

	List tasklist = (List) request.getAttribute("task");
	String taskstatus = "0";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>My JSP 'usergrouptasklist.jsp' starting page</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<link rel="stylesheet"
			href="<%=request.getContextPath()%>/css/common.css" type="text/css" />
		<script type='text/javascript'
			src='<%=request.getContextPath()%>/js/sorttable.js'></script>
		
	</head>

	<body>
		<div id="page_container">
			<div id="page_nav">
				<%@   include file="banner.jsp"%>
			</div>
			<h2>
				收到的任务列表
			</h2>
			<table class="table_common sortable" width="600">
				<tr class="row_head">
					<th>
						发送者
					</th>
					<th>
						发送时间
					</th>
					<th>
						状态
					</th>
					<th>
						查看详情
					</th>
				</tr>

				<%
					for (int a = 0; a < tasklist.size(); a++) {
						if(a%2 == 0){
							out.println("<tr class='row_even'>");
						}else{
							out.println("<tr class='row_odd'> ");
						}
						
						
						Object[] oneTaskRecord = (Object[]) tasklist.get(a);
						out.println("<td>");
						out.println(oneTaskRecord[2]);
						out.println("</td>");
						out.println("<td>");
						out.println(oneTaskRecord[4].toString().substring(0,19));
						out.println("</td>");
						out.println("<td>");
						out.println(oneTaskRecord[0]);
						out.println("</td>");
						out.println("<td>");
						out
								.println("<a href='systemusergrouptaskallocation/readOneTaskByTaskId.action?systemuserid="
										+ userid
										+ "&systemusergroupid="
										+ usergroupid
										+ "&taskstatusid="
										+ oneTaskRecord[14]
										+ "'>>>查看详情</a>");
						out.println("</td>");
						out.println("</tr>");
					}
				%>



			</table>
			<div class="navigator">
				<table>
					<tr>
						<td colspan="9">
							共
							<s:property value="totalRows" />
							条&nbsp; 第
							<s:property value="currentPage" />
							页&nbsp; 共
							<s:property value="pager.getTotalPages()" />
							页&nbsp;
							<a
								href="<s:url value="/systemusergrouptaskallocation/listReveivedTask.action">
       <s:param name="currentPage" value="currentPage"/>
       <s:param name="pagerMethod" value="'first'"/>
       
      </s:url>">首页</a>
							<a
								href="<s:url value="/systemusergrouptaskallocation/listReveivedTask.action">
       <s:param name="currentPage" value="currentPage"/>
       <s:param name="pagerMethod" value="'previous'"/>
      </s:url>">上一页</a>
							<a
								href="<s:url value="/systemusergrouptaskallocation/listReveivedTask.action">
       <s:param name="currentPage" value="currentPage"/>
       <s:param name="pagerMethod" value="'next'"/>
      </s:url>">下一页</a>
							<a
								href="<s:url value="/systemusergrouptaskallocation/listReveivedTask.action">
       <s:param name="currentPage" value="currentPage"/>
       <s:param name="pagerMethod" value="'last'"/>
      </s:url>">尾页</a>
						</td>
					</tr>
				</table>
			</div>
		</div>
	</body>
</html>
